***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
*** This Program already converted to Y2K                                                                                                                                                                                                                 
*** S&T Departement     on 29 April 1999 by Ben.Rahman                                                                                                                                                                                                    
***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
set cent on                                                                                                                                                                                                                                               
SET PROC TO SOSPRO                                                                                                                                                                                                                                        
SET PROC TO BOXPROC                                                                                                                                                                                                                                       
DR='N:'                                                                                                                                                                                                                                                   
STORE ' ' TO AEANAME,AEAADDR,AEACITY,AEACOUN,AEACURR                                                                                                                                                                                                      
STORE .F. TO AEAHEAL,AEADECI                                                                                                                                                                                                                              
do start                                                                                                                                                                                                                                                  
SET EXCLU OFF                                                                                                                                                                                                                                             
DR='N:'                                                                                                                                                                                                                                                   
F1='REVENUE.DBF'                                                                                                                                                                                                                                          
F2='REVENUEY.DBF'                                                                                                                                                                                                                                         
F3='REVENUET.DBF'                                                                                                                                                                                                                                         
SET COLO TO BG+/B,w+/n                                                                                                                                                                                                                                    
CLEAR                                                                                                                                                                                                                                                     
DO ADDRESSS                                                                                                                                                                                                                                               
DO ADDRTITL WITH 'DAILY CASHIER REPORT'                                                                                                                                                                                                                   
SELE 1                                                                                                                                                                                                                                                    
USE &DR&F1                                                                                                                                                                                                                                                
CASHN=SPACE(16)                                                                                                                                                                                                                                           
SET COLO TO BG+/B,W+/N                                                                                                                                                                                                                                    
TRANDAT=CTOD('  /  /    ')                                                                                                                                                                                                                                
DO BOXE  WITH 10,23,"CASHIER NAME :",'CASHN','GR+','rb','W+','N',16,.F.,.T.                                                                                                                                                                               
SET COLO TO BG+/B,W+/N                                                                                                                                                                                                                                    
*@ 14, 26 SAY 'TRANSACTION DATE  : ' GET TRANDAT PICT '99/99/9999'                                                                                                                                                                                        
*READ                                                                                                                                                                                                                                                     
DO BOXD WITH 14,24,'TRANSACTION DATE  : ','TRANDAT','GR+','RB','W+','N','DATE()','DATE()-36500',.F.,.T.                                                                                                                                                   
IF LASTKEY()=27                                                                                                                                                                                                                                           
   CLOSE ALL                                                                                                                                                                                                                                              
   RETURN                                                                                                                                                                                                                                                 
ENDIF                                                                                                                                                                                                                                                     
IF TRANDAT=DATE()                                                                                                                                                                                                                                         
   SELE 1                                                                                                                                                                                                                                                 
   USE &DR&F1                                                                                                                                                                                                                                             
   TGL=DTOC(TRANDAT)                                                                                                                                                                                                                                      
ELSE                                                                                                                                                                                                                                                      
   SELE 1                                                                                                                                                                                                                                                 
   USE &DR&F2                                                                                                                                                                                                                                             
   COPY TO &DR&F3 FOR DATE_VISIT=TRANDAT .AND. CASH_NAME=CASHN                                                                                                                                                                                            
   SELE 1                                                                                                                                                                                                                                                 
   USE &DR&F3                                                                                                                                                                                                                                             
   APPEN FROM &DR&F1 FOR CASH_NAME=CASHN                                                                                                                                                                                                                  
   TGL=DTOC(TRANDAT) +' - '+DTOC(DATE())                                                                                                                                                                                                                  
ENDIF                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                          
SET DEVI TO PRIN                                                                                                                                                                                                                                          
@ 0,0 SAY CHR(15) PICT 'X'                                                                                                                                                                                                                                
BR=0                                                                                                                                                                                                                                                      
@ BR,0 SAY 'CASHIER NAME : '+CASHN+'   '+'DATE TRANSACTION : '+TGL                                                                                                                                                                                        
BR=2                                                                                                                                                                                                                                                      
* NO.  INVOICE #     CASH-USD     CASH-RMB         AMEX        V/M/D          JCB   CHEQUE USD   CHEQUE RMB       CREDIT                                                                                                                                  
*999.  XXXXXX      999,999.99   99,999,999   99,999,999   99,999,999   99,999,999   999,999.99   999,999.99   999,999.99                                                                                                                                  
@ BR,2 SAY 'NO.'                                                                                                                                                                                                                                          
@ BR,7  SAY 'INVOICE #.'                                                                                                                                                                                                                                  
@ BR,21  SAY 'CASH-USD'                                                                                                                                                                                                                                   
@ BR,34 SAY 'CASH-RMB'                                                                                                                                                                                                                                    
@ BR,51 SAY 'AMEX'                                                                                                                                                                                                                                        
@ BR,63 SAY 'V/M/D'                                                                                                                                                                                                                                       
@ BR,78 SAY 'JCB'                                                                                                                                                                                                                                         
@ BR,84 SAY 'CHEQUE-USD'                                                                                                                                                                                                                                  
@ BR,97 SAY 'CHEQUE-RMB'                                                                                                                                                                                                                                  
@ BR,114 SAY 'CREDIT'                                                                                                                                                                                                                                     
@ BR,124 SAY 'DESCRIPTION'                                                                                                                                                                                                                                
BR=3                                                                                                                                                                                                                                                      
STORE 0 TO TCASHUSD,TCASHRMB,TCARDONE,TCARDTWO,TCARDTHR,TCHEQUSD,TCHEQRMB,TCREDSAL,CTR                                                                                                                                                                    
GO TOP                                                                                                                                                                                                                                                    
DO WHILE .NOT. EOF()                                                                                                                                                                                                                                      
   IF CASH_NAME<>CASHN                                                                                                                                                                                                                                    
      SKIP                                                                                                                                                                                                                                                
      LOOP                                                                                                                                                                                                                                                
   ENDIF                                                                                                                                                                                                                                                  
   IF SUBST(INV_STAT,1,1)='V'                                                                                                                                                                                                                             
      KET='VOID'                                                                                                                                                                                                                                          
   ELSE                                                                                                                                                                                                                                                   
      KET='   '                                                                                                                                                                                                                                           
   ENDIF                                                                                                                                                                                                                                                  
   INVNUMB=INV_NBER                                                                                                                                                                                                                                       
   PATCODE=PAT_FILCOD                                                                                                                                                                                                                                     
   STORE 0 TO CASHUSD,CASHRMB,CARDONE,CARDTWO                                                                                                                                                                                                             
   STORE 0 TO CARDTHR,CHEQUSD,CHEQRMB,CREDSAL                                                                                                                                                                                                             
   DO CASE                                                                                                                                                                                                                                                
   CASE TOTAL_CASH<>0 .AND. TOTAL_CRED<>0                                                                                                                                                                                                                 
     DO CASE                                                                                                                                                                                                                                              
     CASE RECE_USD<>0                                                                                                                                                                                                                                     
          CASHUSD=TOTAL_CASH                                                                                                                                                                                                                              
          CREDSAL=TOTAL_CRED                                                                                                                                                                                                                              
     CASE RECE_RMB<>0                                                                                                                                                                                                                                     
          CASHRMB=OTHE_AMNT                                                                                                                                                                                                                               
          CREDSAL=TOTAL_CRED                                                                                                                                                                                                                              
     ENDCASE                                                                                                                                                                                                                                              
   CASE PAY_MODE='CASH'                                                                                                                                                                                                                                   
     DO CASE                                                                                                                                                                                                                                              
     CASE RECE_USD<>0                                                                                                                                                                                                                                     
          CASHUSD=TOTAL_CASH                                                                                                                                                                                                                              
     CASE RECE_RMB<>0                                                                                                                                                                                                                                     
          CASHRMB=OTHE_AMNT                                                                                                                                                                                                                               
     ENDCASE                                                                                                                                                                                                                                              
   CASE PAY_MODE='CHEQUE'                                                                                                                                                                                                                                 
     DO CASE                                                                                                                                                                                                                                              
     CASE RECE_USD<>0                                                                                                                                                                                                                                     
          CHEQUSD=TOTAL_CASH                                                                                                                                                                                                                              
     CASE RECE_RMB<>0                                                                                                                                                                                                                                     
          CHEQRMB=OTHE_AMNT                                                                                                                                                                                                                               
     ENDCASE                                                                                                                                                                                                                                              
   CASE PAY_MODE='CARD'                                                                                                                                                                                                                                   
     DO CASE                                                                                                                                                                                                                                              
        CASE PAY_ON='VISA' .OR. PAY_ON='MASTER' .OR. PAY_ON='DINERS'                                                                                                                                                                                      
             CARDTWO=OTHE_AMNT                                                                                                                                                                                                                            
        CASE PAY_ON='AMEX'                                                                                                                                                                                                                                
             CARDONE=OTHE_AMNT                                                                                                                                                                                                                            
        CASE PAY_ON='JCB'                                                                                                                                                                                                                                 
             CARDTHR=OTHE_AMNT                                                                                                                                                                                                                            
        ENDCASE                                                                                                                                                                                                                                           
    CASE PAY_MODE='CREDIT'                                                                                                                                                                                                                                
         CREDSAL=TOTAL_CRED                                                                                                                                                                                                                               
    ENDCASE                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                          
    CTR=CTR+1                                                                                                                                                                                                                                             
    @ BR,1  SAY STR(CTR,3)+'.'                                                                                                                                                                                                                            
    @ BR,7  SAY INVNUMB PICT '@!'                                                                                                                                                                                                                         
    @ BR,19  SAY CASHUSD PICT '99,999.99'                                                                                                                                                                                                                 
    @ BR,32 SAY CASHRMB PICT '9,999,999'                                                                                                                                                                                                                  
    @ BR,45 SAY CARDONE PICT '9,999,999'                                                                                                                                                                                                                  
    @ BR,58 SAY CARDTWO PICT '9,999,999'                                                                                                                                                                                                                  
    @ BR,71 SAY CARDTHR PICT '9,999,999'                                                                                                                                                                                                                  
    @ BR,84 SAY CHEQUSD PICT '99,999.99'                                                                                                                                                                                                                  
    @ BR,97 SAY CHEQRMB PICT '9,999,999'                                                                                                                                                                                                                  
    @ BR,110 SAY CREDSAL PICT '99,999.99'                                                                                                                                                                                                                 
    @ BR,124 SAY KET PICT '@!'                                                                                                                                                                                                                            
    TCASHUSD=TCASHUSD+CASHUSD                                                                                                                                                                                                                             
    TCASHRMB=TCASHRMB+CASHRMB                                                                                                                                                                                                                             
    TCARDONE=TCARDONE+CARDONE                                                                                                                                                                                                                             
    TCARDTWO=TCARDTWO+CARDTWO                                                                                                                                                                                                                             
    TCARDTHR=TCARDTHR+CARDTHR                                                                                                                                                                                                                             
    TCHEQUSD=TCHEQUSD+CHEQUSD                                                                                                                                                                                                                             
    TCHEQRMB=TCHEQRMB+CHEQRMB                                                                                                                                                                                                                             
    TCREDSAL=TCREDSAL+CREDSAL                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                          
    BR=BR+1                                                                                                                                                                                                                                               
    IF BR>50                                                                                                                                                                                                                                              
       BR=0                                                                                                                                                                                                                                               
       @ BR,0 SAY 'CASHIER NAME : '+CASHN+'   '+'DATE TRANSACTION : '+TGL                                                                                                                                                                                 
       BR=2                                                                                                                                                                                                                                               
       @ BR,2 SAY 'NO.'                                                                                                                                                                                                                                   
       @ BR,7  SAY 'INVOICE #.'                                                                                                                                                                                                                           
       @ BR,21  SAY 'CASH-USD'                                                                                                                                                                                                                            
       @ BR,34 SAY 'CASH-RMB'                                                                                                                                                                                                                             
       @ BR,51 SAY 'AMEX'                                                                                                                                                                                                                                 
       @ BR,63 SAY 'V/M/D'                                                                                                                                                                                                                                
       @ BR,78 SAY 'JCB'                                                                                                                                                                                                                                  
       @ BR,84 SAY 'CHEQUE-USD'                                                                                                                                                                                                                           
       @ BR,97 SAY 'CHEQUE-RMB'                                                                                                                                                                                                                           
       @ BR,114 SAY 'CREDIT'                                                                                                                                                                                                                              
       @ BR,124 SAY 'DESCRIPTION'                                                                                                                                                                                                                         
       BR=3                                                                                                                                                                                                                                               
*       EJECT                                                                                                                                                                                                                                             
    ENDIF                                                                                                                                                                                                                                                 
    SKIP                                                                                                                                                                                                                                                  
ENDDO                                                                                                                                                                                                                                                     
BR=BR+2                                                                                                                                                                                                                                                   
@ BR,0   SAY 'GRAND TOTAL : '                                                                                                                                                                                                                             
@ BR,19  SAY TCASHUSD PICT '99,999.99'                                                                                                                                                                                                                    
@ BR,32 SAY TCASHRMB PICT '9,999,999'                                                                                                                                                                                                                     
@ BR,45 SAY TCARDONE PICT '9,999,999'                                                                                                                                                                                                                     
@ BR,58 SAY TCARDTWO PICT '9,999,999'                                                                                                                                                                                                                     
@ BR,71 SAY TCARDTHR PICT '9,999,999'                                                                                                                                                                                                                     
@ BR,84 SAY TCHEQUSD PICT '99,999.99'                                                                                                                                                                                                                     
@ BR,97 SAY TCHEQRMB PICT '9,999,999'                                                                                                                                                                                                                     
@ BR,110 SAY TCREDSAL PICT '99,999.99'                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                          
EJECT                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                          
SET DEVI TO SCREEN                                                                                                                                                                                                                                        
CLEAR                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                          
